package com.jy.appmarket.screenlock.activity;

import com.jy.appmarket.R;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.Window;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.TextView;

public class InitSettingDialogActivity extends Activity implements OnClickListener{

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		requestWindowFeature(Window.FEATURE_NO_TITLE);
		setContentView(R.layout.text_dialog);
		
		initView();
	}

	private void initView(){
		TextView titleTv = findViewById(R.id.text_dialog_title_tv);
		ImageView iconIv = findViewById(R.id.text_dialog_icon_iv);
		TextView contentTv = findViewById(R.id.text_dialog_content_tv);
		Button cancelBtn = findViewById(R.id.text_dialog_button1);
		Button confirmBtn = findViewById(R.id.text_dialog_button2);
		
		titleTv.setText(R.string.prompt);
		iconIv.setVisibility(View.GONE);
		contentTv.setText(R.string.init_lock_setting_content);
		contentTv.setVisibility(View.VISIBLE);
		cancelBtn.setText(R.string.cancel);
		cancelBtn.setOnClickListener(this);
		confirmBtn.setText(R.string.init_lock_setting_confirm);
		confirmBtn.setOnClickListener(this);
	}

	@Override
	public void onClick(View v) {
		switch (v.getId()) {
		case R.id.text_dialog_button1:
			finish();
			break;
		case R.id.text_dialog_button2:
			startActivity(new Intent(this,LockInitSettingActivity.class));
			finish();
			break;
		default:
			break;
		}
	}
	
}
